package com.smartbus.bus.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.smartbus.common.annotation.Excel;
import com.smartbus.common.core.domain.BaseEntity;

/**
 * 系统异常日志，记录GPS丢失、语音播放失败等异常情况及处理过程对象 exception_logs
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
public class ExceptionLogs extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID，自增 */
    private Long id;

    /** 公交车ID，关联buses表 */
    @Excel(name = "公交车ID，关联buses表")
    private Long busId;

    /** 异常类型：GPS丢失/语音播放失败/系统错误/手动干预 */
    @Excel(name = "异常类型：GPS丢失/语音播放失败/系统错误/手动干预")
    private String exceptionType;

    /** 异常详细描述 */
    @Excel(name = "异常详细描述")
    private String description;

    /** 发生异常时的线路ID，关联bus_routes表 */
    @Excel(name = "发生异常时的线路ID，关联bus_routes表")
    private Long routeId;

    /** 发生异常时的站点ID，关联bus_stations表 */
    @Excel(name = "发生异常时的站点ID，关联bus_stations表")
    private Long stationId;

    /** 异常发生前最后一次GPS纬度 */
    @Excel(name = "异常发生前最后一次GPS纬度")
    private BigDecimal gpsLastLatitude;

    /** 异常发生前最后一次GPS经度 */
    @Excel(name = "异常发生前最后一次GPS经度")
    private BigDecimal gpsLastLongitude;

    /** 系统错误代码 */
    @Excel(name = "系统错误代码")
    private String errorCode;

    /** 采取的解决措施 */
    @Excel(name = "采取的解决措施")
    private String resolutionAction;

    /** 异常解决时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "异常解决时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date resolvedAt;

    /** 异常记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "异常记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setBusId(Long busId) 
    {
        this.busId = busId;
    }

    public Long getBusId() 
    {
        return busId;
    }

    public void setExceptionType(String exceptionType) 
    {
        this.exceptionType = exceptionType;
    }

    public String getExceptionType() 
    {
        return exceptionType;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setRouteId(Long routeId) 
    {
        this.routeId = routeId;
    }

    public Long getRouteId() 
    {
        return routeId;
    }

    public void setStationId(Long stationId) 
    {
        this.stationId = stationId;
    }

    public Long getStationId() 
    {
        return stationId;
    }

    public void setGpsLastLatitude(BigDecimal gpsLastLatitude) 
    {
        this.gpsLastLatitude = gpsLastLatitude;
    }

    public BigDecimal getGpsLastLatitude() 
    {
        return gpsLastLatitude;
    }

    public void setGpsLastLongitude(BigDecimal gpsLastLongitude) 
    {
        this.gpsLastLongitude = gpsLastLongitude;
    }

    public BigDecimal getGpsLastLongitude() 
    {
        return gpsLastLongitude;
    }

    public void setErrorCode(String errorCode) 
    {
        this.errorCode = errorCode;
    }

    public String getErrorCode() 
    {
        return errorCode;
    }

    public void setResolutionAction(String resolutionAction) 
    {
        this.resolutionAction = resolutionAction;
    }

    public String getResolutionAction() 
    {
        return resolutionAction;
    }

    public void setResolvedAt(Date resolvedAt) 
    {
        this.resolvedAt = resolvedAt;
    }

    public Date getResolvedAt() 
    {
        return resolvedAt;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("busId", getBusId())
            .append("exceptionType", getExceptionType())
            .append("description", getDescription())
            .append("routeId", getRouteId())
            .append("stationId", getStationId())
            .append("gpsLastLatitude", getGpsLastLatitude())
            .append("gpsLastLongitude", getGpsLastLongitude())
            .append("errorCode", getErrorCode())
            .append("resolutionAction", getResolutionAction())
            .append("resolvedAt", getResolvedAt())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
